package demo4;
interface IA{
    void testA();
}

interface IB{
    void testB();
}

interface IC extends IA,IB{

}

class D implements IC{

    @Override
    public void testA() {

    }

    @Override
    public void testB() {

    }
}


public class Test {
    public static void main(String[] args) {
        Object obj1=new Duck("唐老鸭",13);
        Object obj2=new Duck("唐老鸭",13);
//        System.out.println(obj1==obj2);
//        System.out.println(obj1.equals(obj2));
        System.out.println(obj1.hashCode());
        System.out.println(obj2.hashCode());
    }
    public static void swimming(ISwim iSwim){
        iSwim.swim();
    }
    public static void func(Animal animal){
        animal.eat();
    }

    public static void main1(String[] args) {
        Duck duck=new Duck("唐老鸭",13);
        func(duck);
        swimming(new Duck("唐老鸭",13));
    }
}
